//模块的构造方法
function Driver(rs) {
	this.id=rs.id;
	this.driverno=rs.driverno;
	this.realname=rs.realname;
	this.licenseplateno=rs.licenseplateno;
	this.phone=rs.phone;
	this.position=rs.position;
	this.cartype=rs.cartype;
	this.carbrands=rs.carbrands;
	this.distance=rs.distance;
	this.carcovercase=rs.carcovercase;
	this.remainseats=rs.remainseats;
	this.queuing=rs.queuing;
	this.checkdri=rs.checkdri;
}
//定义表名
Driver.entityName = 'drivers';
//主键
Driver.entityIndex = 'id';
//redis过期时间
Driver.entityExpiration = 60*5;
Driver.entityCreated = 'created';
//属性
Driver.propNamesAsArray = [ 'id', 'driverno', 'realname', 'licenseplateno','phone','position','cartype','carbrands','distance','carcovercase','remainseats','queuing','checkdri'];
//获得class用于redis删除对象
Driver.prototype.getClass = function() {
    return Driver;
};
//获得表名
Driver.prototype.getEntityName = function() {
    return Driver.entityName;
};
//获得主键
Driver.prototype.getEntityIndex = function() {
    return Driver.entityIndex;
};
//获得过期时间
Driver.prototype.getEntityExpiration = function() {
    return Driver.entityExpiration;
};

Driver.prototype.getEntityCreated = function() {
    return Driver.entityCreated;
};
//获得属性名称列表
Driver.prototype.getPropNamesAsArray = function() {
    return Driver.propNamesAsArray;
};
//获得属性名称列表
Driver.prototype.asArray = function() {
    return [
        this.id,
        this.driverno,
        this.realname,
        this.licenseplateno,
        this.phone,
        this.position,
        this.cartype,
        this.carbrands,
        this.distance,
        this.carcovercase,
        this.remainseats,
        this.queuing,
        this.checkdri
    ];
};
module.exports.Driver = Driver;